package vip.liux.contracts.models.product;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import lombok.Getter;
import lombok.Setter;
import vip.liux.contracts.shared.enums.product.CategoryLevel;
import vip.liux.contracts.shared.enums.product.CategoryType;
import vip.liux.domain.entities.auditing.AuditedEntity;

@Getter
@Setter
@Entity
@Table(name = "shop_category")
public class Category extends AuditedEntity<Long> {
    /**
     * 类目类型 0:实物类,1:虚拟类
     */
    @Column(name = "type", nullable = false)
    private CategoryType type;

    /**
     * 类目级别 0:一级类目,1:二级类目,2:三级类目
     */
    @Column(name = "level", nullable = false)
    private CategoryLevel level;

    /**
     * 父类目编号
     */
    @Column(name = "parent_no")
    private String parentNo;

    /**
     * 类目编号
     */
    @Column(name = "cat_no", nullable = false, length = 128)
    private String catNo;

    /**
     * 类目名称
     */
    @Column(name = "cat_name", nullable = false, length = 128)
    private String catName;

    public void setId(Long id) {
        super.setId(id);
    }
}